package test;

import com.neuedu.AdminApp;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;

@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = AdminApp.class)
public class PasswordEncoder {

    @Resource
    BCryptPasswordEncoder bCryptPasswordEncoder;

    @Test
   public void handler(){
        String encode = bCryptPasswordEncoder.encode("1234");
        System.out.println(encode);
    }

}
